<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* 
            align-content 设置多行项目在交叉轴上的对齐方式
            stretch（默认） 轴线占满整个交叉轴（每行项目下面的空白相等）
            flex-start 交叉轴开始（起点）位置
            flex-end 交叉轴结束（终点）位置
            center 交叉轴中间（中点）位置
            space-around 每行项目两侧的间隔（空白）相等
            space-between 项目在两端，项目之间的间隔（空白）相等
            space-evenly 每行项目两侧的间隔（空白）相等（中间部分是公用）    
        */
        .main {
            width: 600px;
            height: 600px;
            border: 1px solid red;
            display: flex;
            flex-flow: wrap;
            align-content: stretch;
            align-content: center;
            align-content: flex-start;
            align-content: flex-end;
            align-content: space-around;
            align-content: space-between;
            align-content: space-evenly;
        }
        .main > div {
            width: 100px;
            height: 100px;
            border: solid;
        }
    </style>
</head>
<body>
    <div class="main">
        <div>4</div>
        <div>4</div>
        <div>4</div>
        <div>4</div>
        <div>4</div>
        <div>4</div>
        <div>4</div>
        <div>4</div>
        <div>4</div>
        <div>4</div>
        <div>4</div>
        <div>4</div>
        <div>4</div>
        <div>4</div>
        <div>4</div>
        <div>4</div>
        <div>4</div>
        <div>4</div>
        <div>4</div>
        <div>4</div>
        <div>4</div>
    </div>
</body>
</html>